package com.virtualmall.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.virtualmall.bean.Product;
import com.virtualmall.common.Page;
import com.virtualmall.service.BaseService;
import com.virtualmall.service.ProductService;

@Service
@Transactional
public class ProductServiceImpl extends BaseService implements ProductService {

	public void create(Product product) {
		this.productDao.create(product);
	}

	public Product read(Long id) {
		return this.productDao.read(id);
	}

	public void delete(Product product) {
		this.productDao.delete(product);
	}

	public List<Product> getProductList(String keyword,Page page) {
		return this.productDao.getProductList(keyword,page);
	}

	public Long getProductListCount(String keyword) {
		return this.productDao.getProductListCount(keyword);
	}

    public void update(Product product) {
        this.productDao.update(product);
    }
}
